import {
	$http
} from '@escook/request-miniprogram'

// 设置基地址
$http.baseUrl = 'https://cleaning.51meteor.com'

// 请求拦截
$http.beforeRequest = function(options) {
	options.header.token = uni.getStorageSync('token')
	uni.showLoading({
		title: '数据加载中...',
	})
}

// 响应拦截
$http.afterRequest = function() {
	uni.hideLoading()
}

// 挂载到uni
uni.$http = $http
